package com.zyf.client;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/** 服务调用cmn的接口
 * @author zyf
 * @date 2021年05月10日 17:27
 */
@FeignClient("service-cmn")
@Repository
public interface DictFeignClient {

    @GetMapping("/admin/cmn/dict/getName/{dictCode}/{value}")
    @ApiOperation(value = "根据dictcode和value查询name")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "dictCode",value = "数据字典的code"),
            @ApiImplicitParam(name = "value",value = "数据字典的value")
    })
    String getName(@PathVariable("dictCode") String dictCode, @PathVariable("value") String value);

    @GetMapping("/admin/cmn/dict/getName/{value}")
    @ApiOperation(value = "根据value查询name")
    @ApiImplicitParam(name = "value",value = "数据字典的value")
    String getName(@PathVariable("value") String value);
}
